package com.xlh.codeserver.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xlh.codeserver.entity.Container;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface ContainerDao extends BaseMapper<Container> {
    default Container selectByBaseUrl(String baseUrl) {
        return (Container)this.selectOne((Wrapper)((QueryWrapper)(new QueryWrapper()).eq("base_url", baseUrl)).last("limit 1"));
    }
}
